package com.xiaowen.wxpaytool.modle;

public class PrepayRequest {
    private String appid;
    private String mchid;
    private String out_trade_no;
    private String notify_url;
    private PrepayPayer payer;
    private PrepayAmount amount;
    private String description="默认描述";

    public PrepayRequest(String appid, String mchid, String out_trade_no, String notify_url, String openid, Integer total) {
        this.appid = appid;
        this.mchid = mchid;
        this.out_trade_no = out_trade_no;
        this.notify_url = notify_url;
        this.payer = new PrepayPayer(openid);
        this.amount = new  PrepayAmount(total);
    }
    public PrepayRequest(String appid, String mchid, String out_trade_no, String notify_url, String openid,String description, Integer total) {
        this.appid = appid;
        this.mchid = mchid;
        this.out_trade_no = out_trade_no;
        this.notify_url = notify_url;
        this.description=description;
        this.payer = new PrepayPayer(openid);
        this.amount = new  PrepayAmount(total);
    }

    class PrepayPayer{
        private String openid;

        public String getOpenid() {
            return openid;
        }

        public void setOpenid(String openid) {
            this.openid = openid;
        }

        public PrepayPayer() {
        }

        public PrepayPayer(String openid) {
            this.openid = openid;
        }
    }
    class PrepayAmount{
        private String currency="CNY";
        private Integer total;

        public PrepayAmount(Integer total) {
            this.total = total;
        }

        public String getCurrency() {
            return currency;
        }

        public void setCurrency(String currency) {
            this.currency = currency;
        }

        public Integer getTotal() {
            return total;
        }

        public void setTotal(Integer total) {
            this.total = total;
        }
    }

    public String getAppid() {
        return appid;
    }

    public void setAppid(String appid) {
        this.appid = appid;
    }

    public String getMchid() {
        return mchid;
    }

    public void setMchid(String mchid) {
        this.mchid = mchid;
    }

    public String getOut_trade_no() {
        return out_trade_no;
    }

    public void setOut_trade_no(String out_trade_no) {
        this.out_trade_no = out_trade_no;
    }

    public String getNotify_url() {
        return notify_url;
    }

    public void setNotify_url(String notify_url) {
        this.notify_url = notify_url;
    }

    public PrepayPayer getPayer() {
        return payer;
    }

    public void setPayer(PrepayPayer payer) {
        this.payer = payer;
    }

    public PrepayAmount getAmount() {
        return amount;
    }

    public void setAmount(PrepayAmount amount) {
        this.amount = amount;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
}
